NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation.

Technical Q&A QD3D13
GWorld in the 'grafPort' Field of a MacDrawContext Struct

Q: I placed a GWorld into the grafPort field of a MacDrawContext struct, and QuickDraw successfully drew into it. Are there any speed penalties from doing it this way instead of drawing directly to a window (with or without hardware acceleration)?

A: We recommend against doing this. There is a special kind of draw context, called a pixmap draw context, which is specifically for rendering to an offscreen. If there is a hardware accelerator installed, it will not work properly if you place a GWorld in the grafPort field of a MacDrawContext struct.

The files you need, and some other useful files, such as the Tumbler application, are on AppleLink in the Code Exchange folder under the QuickDraw 3D icon. Look for the "3dmf to pict" code snippet.

Note: for 1.0 you have to set the 2D library to be:

kQ3DrawContext2DLibraryUseNone

[Jun 01 1995]


Developer Documentation | Technical Notes | Development Kits | Sample Code